export default {
	// 获取组件数据
	getParameter(e) {
		var dataset = e?.currentTarget?.dataset;
		return dataset;
	},
	getCurrentPageParam(){
		let pages = getCurrentPages()    //获取加载的页面
		let currentPage = pages[pages.length-1]    //获取当前页面的对象
		let options = currentPage.options    //如果要获取url中所带的参数可以查看options
		return options
	},
	// 字段过滤
	fieldsfiltrati(data, value) {
		let newData = {};
		for (let i in data) {
			if (!value.includes(i)) {
				newData[i] = data[i];
			}
		}
		return newData;
	},
	getFileSuffix(value, key) {
    let nameArray = value.split(key);
    if (nameArray.length != 0) {
      return nameArray[nameArray.length - 1];
    } else {
      return value;
    }
  },
}